package com.itheima.test0906.test03;

public class TestSwimming {
    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("我们明天去游泳(匿名内部类）");
            }
        });

        System.out.println("************************");

        goSwimming(()-> System.out.println("我们后天去游泳(lambda表达式)"));
    }


    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}
